package beedoolgi;

public class ThreadTest extends Thread {
	int cnt;
	ThreadTest (String name, int cnt) {
		super(name);
		this.cnt = cnt;
	}
	
	public void run() {
		int sum = 0;
		try {
			for (int i=0; i<cnt; i++) {
				sleep(1000);
				sum += i;
				System.out.println(getName() + " : " + sum);
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
